<?php
namespace app\admin\model;
use think\Model;
use think\Request;

class StudentClbum extends Model { 
    protected $autoWriteTimestamp = false;  
    protected $auto = ['course_id'];
    //自动写入course_id
    protected function setCourseIdAttr()
    {
        $clbum_id = Request::instance()->param('clbum_id');
        $where['id'] = $clbum_id;
        return Clbum::where($where)->value('course_id');
    }
}